majit: stabilize and trace prepass determinism - #1161
Conversation
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (28)
WalkthroughThe translator now preserves deterministic iteration order, centralizes shared graph-reference creation, and records optional allocation, reflow, notification, and cutover diagnostics. Descriptor members also support ordering. ChangesDeterministic translation and diagnostics
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 95acc0fecd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| pub(crate) fn determinism_trace_enabled() -> bool { | ||
| static ENABLED: std::sync::OnceLock<bool> = std::sync::OnceLock::new(); | ||
| *ENABLED.get_or_init(|| { | ||
| std::env::var_os("PYRE_DETERMINISM_TRACE").is_some_and(|value| value == "1") |
There was a problem hiding this comment.
Document the new diagnostic environment gates
Any workspace test run that includes pyrex now fails every_live_pyre_gate_has_a_gate_triage_entry: this reader and the three new PYRE_DTRACE_CONST_* readers in flowspace/model.rs have no entries in pyre/gate-triage.md. I verified the test reports all four missing names, so add the required triage rows before landing to restore the mandated cargo test --features dynasm run.
AGENTS.md reference: AGENTS.md:L236-L237
Useful? React with 👍 / 👎.
🤖 Codex parity reviewStatic analysis of this diff vs the local RPython/PyPy sources (commit 5fa150d). Files in the reviewed diff1. Regressions to PyPy parity introduced by this patchNone. 2. Other mismatches introduced by this patchNone. 3. Pre-existing mismatches (already present before this patch)
4. Structural adaptations
|
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@majit/majit-translate/src/codewriter/call.rs`:
- Around line 6149-6151: Update the canonicalization logic around DescrSetKeys
so each DescrRef remains paired with its corresponding DescrSetMember while
ordering is normalized. Sort the descriptor/member pairs together, or defer
splitting them until after sorting, and ensure the resulting keys retain the raw
descriptor vectors’ canonical order.
In `@majit/majit-translate/src/lib.rs`:
- Around line 68-75: Update the policy documentation in pyre/gate-triage.md to
register PYRE_DETERMINISM_TRACE and the related constant-trace environment
variables. Ensure all diagnostic variables introduced by the determinism and
constant-trace functionality are listed before release so the policy test
passes.
In `@majit/majit-translate/src/translator/rtyper/cutover.rs`:
- Around line 3258-3285: Add the four determinism-trace environment
variables—PYRE_DETERMINISM_TRACE, PYRE_DTRACE_CONST_BT, PYRE_DTRACE_CONST_FROM,
and PYRE_DTRACE_CONST_TO—to pyre/gate-triage.md, each with a concise description
of its purpose. Keep the documentation scoped to the tracing controls used by
emit_determinism_trace and run_two_phase_prepass_inner.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: a1e65e4f-7970-491a-a255-4a5cd11ddda9
📒 Files selected for processing (19)
majit/majit-ir/src/effectinfo.rsmajit/majit-translate/src/annotator/annrpython.rsmajit/majit-translate/src/annotator/bookkeeper.rsmajit/majit-translate/src/annotator/classdesc.rsmajit/majit-translate/src/annotator/listdef.rsmajit/majit-translate/src/annotator/specialize.rsmajit/majit-translate/src/codewriter/call.rsmajit/majit-translate/src/flowspace/generator.rsmajit/majit-translate/src/flowspace/model.rsmajit/majit-translate/src/flowspace/pygraph.rsmajit/majit-translate/src/lib.rsmajit/majit-translate/src/translator/rtyper/cutover.rsmajit/majit-translate/src/translator/rtyper/flowspace_adapter.rsmajit/majit-translate/src/translator/rtyper/normalizecalls.rsmajit/majit-translate/src/translator/rtyper/pyre_call_registry.rsmajit/majit-translate/src/translator/rtyper/rpbc.rsmajit/majit-translate/src/translator/rtyper/rtyper.rsmajit/majit-translate/src/translator/transform.rsmajit/majit-translate/src/translator/translator.rs
| // The raw set stays in pointer order for identity dedup and lookup, while | ||
| // the member order crossing into the artifact is determined by content. | ||
| keys.sort(); |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
rg -n -C 8 --type rust '\bcanonicalize_keyed_descrs\s*\(' majitRepository: youknowone/pyre
Length of output: 4626
🏁 Script executed:
#!/bin/bash
set -euo pipefail
sed -n '6128,6185p' majit/majit-translate/src/codewriter/call.rs
sed -n '6338,6405p' majit/majit-translate/src/codewriter/call.rs
rg -n -C 6 --type rust 'read_descrs_fields_arcs|readonly_fields|write_descrs_fields_arcs|write_fields|read_descrs_arrays_arcs|readonly_arrays|write_descrs_arrays_arcs|readonly_interiorfields' majit/majit-translate/srcRepository: youknowone/pyre
Length of output: 23670
🏁 Script executed:
#!/bin/bash
set -euo pipefail
rg -n -C 10 --type rust 'struct DescrSetKeys|DescrSetKeys|descr_set_keys|_readonly_descrs_fields|_write_descrs_fields' majitRepository: youknowone/pyre
Length of output: 50372
🏁 Script executed:
#!/bin/bash
set -euo pipefail
rg -n -C 12 --type rust 'descr_set_keys\.(readonly_fields|write_fields|readonly_arrays|write_arrays|readonly_interiorfields|write_interiorfields)|keys\.(readonly_fields|write_fields|readonly_arrays|write_arrays|readonly_interiorfields|write_interiorfields)' majit
rg -n -C 12 --type rust 'DescrMintEntry|DescrMintSpec|descr_set_keys|mint.*descr|deserialize.*descr|rebuild.*descr' majit/majit-ir majit/majit-translate majit/majit-metainterp
sed -n '110,175p' majit/majit-ir/src/effectinfo.rsRepository: youknowone/pyre
Length of output: 153
🏁 Script executed:
#!/bin/bash
set -euo pipefail
rg -n -C 8 --type rust 'readonly_fields|write_fields|DescrMintEntry|DescrMintSpec|descr_set_keys' majit/majit-ir/src/effectinfo.rs majit/majit-ir/src/descr.rs majit/majit-translate/src
sed -n '110,175p' majit/majit-ir/src/effectinfo.rsRepository: youknowone/pyre
Length of output: 50371
🏁 Script executed:
#!/bin/bash
set -euo pipefail
rg -n -C 15 --type rust 'ei_descr_mints|DescrSetKeys \{|descr_set_keys\.as_ref|descr_set_keys\.as_mut|_readonly_descrs_fields\s*=' majit
rg -n -C 12 --type rust 'serde.*EffectInfo|EffectInfo.*Deserialize|from_effect_info|set_effect|register_keyed|ei_descr_mint' majit/majit-ir/src majit/majit-translate/src majit/majit-metainterp/srcRepository: youknowone/pyre
Length of output: 50372
🏁 Script executed:
#!/bin/bash
set -euo pipefail
rg -l --type rust 'ei_descr_mints|DescrSetKeys|descr_set_keys' majit | sort
rg -n -C 10 --type rust 'ei_descr_mints' majit/majit-runtime majit/majit-metainterp majit/majit-translate 2>/dev/null || true
python3 - <<'PY'
pairs = [
("descr_b", "member_z"),
("descr_a", "member_a"),
]
raw_order = sorted(pairs, key=lambda pair: pair[0])
descrs = [descr for descr, _ in raw_order]
keys = sorted(member for _, member in raw_order)
print("raw paired order:", raw_order)
print("returned vectors:", list(zip(descrs, keys)))
print("association preserved:", raw_order == list(zip(descrs, keys)))
PYRepository: youknowone/pyre
Length of output: 10036
🏁 Script executed:
#!/bin/bash
set -euo pipefail
python3 - <<'PY'
pairs = [
("descr_b", "member_a"),
("descr_a", "member_z"),
]
raw_order = sorted(pairs, key=lambda pair: pair[0])
descrs = [descr for descr, _ in raw_order]
keys = sorted(member for _, member in raw_order)
returned = list(zip(descrs, keys))
print("raw paired order:", raw_order)
print("returned vectors:", returned)
print("association preserved:", raw_order == returned)
PYRepository: youknowone/pyre
Length of output: 320
Keep DescrRef and DescrSetMember paired during canonicalization
DescrSetKeys must keep the same canonical order as the raw descriptor vectors. Sorting keys after splitting the pairs breaks the association when pointer order differs from member order. Sort the pairs instead, or preserve pairing until the consumer separates the vectors.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@majit/majit-translate/src/codewriter/call.rs` around lines 6149 - 6151,
Update the canonicalization logic around DescrSetKeys so each DescrRef remains
paired with its corresponding DescrSetMember while ordering is normalized. Sort
the descriptor/member pairs together, or defer splitting them until after
sorting, and ensure the resulting keys retain the raw descriptor vectors’
canonical order.
| // Exists to localise prepass nondeterminism (gh#1139). | ||
| fn emit_determinism_trace(phase: &str, index: usize, canonical_key: &str) { | ||
| eprintln!( | ||
| "[DTRACE] {phase} {index} {canonical_key} var={} const={} reflow={} block={} rf_list={} rf_sub={} rf_attr={} rf_pbc={} rf_notify={} widen={} nupd={} breuse={} greuse={} nhitreused={}", | ||
| crate::flowspace::model::next_var_id(), | ||
| crate::flowspace::model::next_constant_id(), | ||
| crate::annotator::annrpython::reflow_count(), | ||
| crate::annotator::annrpython::processblock_count(), | ||
| crate::annotator::listdef::reflow_from_listitem_count(), | ||
| crate::annotator::classdesc::reflow_from_subclass_count(), | ||
| crate::annotator::bookkeeper::reflow_from_attr_count(), | ||
| crate::annotator::bookkeeper::reflow_from_pbc_count(), | ||
| crate::annotator::annrpython::reflow_from_notify_count(), | ||
| crate::annotator::listdef::listitem_widen_count(), | ||
| crate::annotator::listdef::listitem_notify_update_count(), | ||
| crate::flowspace::model::block_addr_reuse_count(), | ||
| crate::flowspace::model::graph_addr_reuse_count(), | ||
| crate::annotator::annrpython::notify_hit_on_reused_count(), | ||
| ); | ||
| } | ||
|
|
||
| fn run_two_phase_prepass_inner( | ||
| call_registry: &PyreCallRegistry, | ||
| candidate_graphs: &HashSet<crate::parse::CallPath>, | ||
| function_graphs: &crate::codewriter::call::GraphStore, | ||
| ) { | ||
| // Exists to localise prepass nondeterminism (gh#1139). | ||
| let determinism_trace = crate::determinism_trace_enabled(); |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Locate the environment-variable definitions and the policy registry.
rg -n -C 3 'determinism_trace_enabled|std::env::var|std::env::var_os|env::var|env::var_os' \
majit/majit-translate/src
rg -n -C 3 'DTRACE|TRACE|DETERMIN|MAJIT_' pyre/gate-triage.mdRepository: youknowone/pyre
Length of output: 39989
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '%s\n' '--- tracing readers ---'
rg -n -C 5 'PYRE_DETERMINISM_TRACE|PYRE_DTRACE_CONST_(BT|FROM|TO)|DTRACE[-_]' \
majit/majit-translate/src
printf '%s\n' '--- policy registry context ---'
sed -n '780,860p' pyre/gate-triage.md
sed -n '940,1010p' pyre/gate-triage.md
printf '%s\n' '--- repository-wide references ---'
rg -n 'PYRE_DETERMINISM_TRACE|PYRE_DTRACE_CONST_(BT|FROM|TO)' .Repository: youknowone/pyre
Length of output: 27474
Register the determinism-trace environment variables in pyre/gate-triage.md.
Add PYRE_DETERMINISM_TRACE, PYRE_DTRACE_CONST_BT, PYRE_DTRACE_CONST_FROM, and PYRE_DTRACE_CONST_TO, with a short purpose for each.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@majit/majit-translate/src/translator/rtyper/cutover.rs` around lines 3258 -
3285, Add the four determinism-trace environment
variables—PYRE_DETERMINISM_TRACE, PYRE_DTRACE_CONST_BT, PYRE_DTRACE_CONST_FROM,
and PYRE_DTRACE_CONST_TO—to pyre/gate-triage.md, each with a concise description
of its purpose. Keep the documentation scoped to the tracing controls used by
emit_determinism_trace and run_two_phase_prepass_inner.
…ify's block `RPythonAnnotator::notify`'s position set, the graph maps built in `complete` and `seed_all_annotated_return_vars`, and `ListItem::read_locations` were `HashSet`/`HashMap` keyed on values derived from `Rc::as_ptr`. Each of those loops issues `reflowfromposition` calls, so their iteration order is a work order, and hashing an address makes that order differ between processes. They now use `IndexSet`/`IndexMap`, the containers `annotated`, `added_blocks`, `blocked_blocks` and `genpendingblocks` already use in the same file. `notify` additionally stored only the block's address and never a reference to it, and it is the only `BlockKey`-keyed map that is never pruned — its siblings are all `shift_remove`d when a block leaves the annotator's view. Entries now carry the `BlockRef` they are keyed on, so the address behind a live key cannot be handed to a later block. The prepass census flip reported in gh#1139 still occurs with these changes applied. Assisted-by: Claude
…et keys `RPythonAnnotator::links_followed` keyed links by `Rc::as_ptr` while holding no reference to them. `transform_dead_code` drops a link's last `Rc` in the same loop in which `cutoff_alwaysraising_block` allocates a fresh one, so a new link can land on a freed but still-recorded address and read back as already followed; the dead arm then survives and the block's cutoff never runs. Hold the `LinkRef` in the map, as `all_blocks` and `notify` do. The `seen` map that `annotate`'s block-subset path builds is also keyed on a pointer and iterated to produce a work order; make it ordered. `canonicalize_keyed_descrs` returned `descr_set_keys` in `Arc` address order, so the serialized effect info carried a different member order per process. Sort the keys by content, which `DescrSetMember` now derives `Ord` for. The raw `_*_descrs_*` sets keep pointer order, which the `descr_ptr_id` binary_search in `compute_bitstrings` requires; the reader rebuilds those sets from the keys and re-canonicalises, so the two orders are independent. Assisted-by: Claude
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@pyre/extra_tests/parity_tests/dict_set_sizeof_python314.py`:
- Around line 1-3: Update the leading parity-gap comment in
dict_set_sizeof_python314.py to state that exact __sizeof__ values for dict,
set, and frozenset are asserted by the tests below, while retaining the existing
purpose of guarding Pyre’s CPython 3.14 container-size behavior.
In `@pyre/gate-triage.md`:
- Line 974: Update the entry count in the “Default-OFF diagnostics, censuses and
probes” heading from 54 to 55, leaving the listed diagnostic names unchanged.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 6b8160b9-aea8-4236-8e64-d3e8014302f5
📒 Files selected for processing (28)
pyre/extra_tests/parity_tests/bool_text_signatures_python314.pypyre/extra_tests/parity_tests/builtin_text_signatures_python314.pypyre/extra_tests/parity_tests/bytearray_text_signatures_python314.pypyre/extra_tests/parity_tests/bytes_text_signatures_python314.pypyre/extra_tests/parity_tests/complex_text_signatures_python314.pypyre/extra_tests/parity_tests/dict_set_sizeof_python314.pypyre/extra_tests/parity_tests/dict_text_signatures_python314.pypyre/extra_tests/parity_tests/float_text_signatures_python314.pypyre/extra_tests/parity_tests/functional_iterator_text_signatures_python314.pypyre/extra_tests/parity_tests/int_text_signatures_python314.pypyre/extra_tests/parity_tests/jit_itemgetter_branch_comprehension.pypyre/extra_tests/parity_tests/jit_recursive_closure_live_set.pypyre/extra_tests/parity_tests/list_text_signatures_python314.pypyre/extra_tests/parity_tests/memoryview_text_signatures_python314.pypyre/extra_tests/parity_tests/memoryview_tobytes_order_python314.pypyre/extra_tests/parity_tests/method_wrapper_text_signatures_python314.pypyre/extra_tests/parity_tests/ordered_dict_python314.pypyre/extra_tests/parity_tests/property_text_signatures_python314.pypyre/extra_tests/parity_tests/range_text_signatures_python314.pypyre/extra_tests/parity_tests/script_source_encoding_startup.pypyre/extra_tests/parity_tests/set_text_signatures_python314.pypyre/extra_tests/parity_tests/slice_text_signatures_python314.pypyre/extra_tests/parity_tests/str_text_signatures_python314.pypyre/extra_tests/parity_tests/super_text_signatures_python314.pypyre/extra_tests/parity_tests/syntax_error_python314_offsets.pypyre/extra_tests/parity_tests/tuple_text_signatures_python314.pypyre/extra_tests/parity_tests/type_text_signatures_python314.pypyre/gate-triage.md
There was a problem hiding this comment.
Caution
Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@pyre/extra_tests/parity_tests/dict_set_sizeof_python314.py`:
- Around line 1-3: Update the leading parity-gap comment in
dict_set_sizeof_python314.py to state that exact __sizeof__ values for dict,
set, and frozenset are asserted by the tests below, while retaining the existing
purpose of guarding Pyre’s CPython 3.14 container-size behavior.
In `@pyre/gate-triage.md`:
- Line 974: Update the entry count in the “Default-OFF diagnostics, censuses and
probes” heading from 54 to 55, leaving the listed diagnostic names unchanged.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 6b8160b9-aea8-4236-8e64-d3e8014302f5
📒 Files selected for processing (28)
pyre/extra_tests/parity_tests/bool_text_signatures_python314.pypyre/extra_tests/parity_tests/builtin_text_signatures_python314.pypyre/extra_tests/parity_tests/bytearray_text_signatures_python314.pypyre/extra_tests/parity_tests/bytes_text_signatures_python314.pypyre/extra_tests/parity_tests/complex_text_signatures_python314.pypyre/extra_tests/parity_tests/dict_set_sizeof_python314.pypyre/extra_tests/parity_tests/dict_text_signatures_python314.pypyre/extra_tests/parity_tests/float_text_signatures_python314.pypyre/extra_tests/parity_tests/functional_iterator_text_signatures_python314.pypyre/extra_tests/parity_tests/int_text_signatures_python314.pypyre/extra_tests/parity_tests/jit_itemgetter_branch_comprehension.pypyre/extra_tests/parity_tests/jit_recursive_closure_live_set.pypyre/extra_tests/parity_tests/list_text_signatures_python314.pypyre/extra_tests/parity_tests/memoryview_text_signatures_python314.pypyre/extra_tests/parity_tests/memoryview_tobytes_order_python314.pypyre/extra_tests/parity_tests/method_wrapper_text_signatures_python314.pypyre/extra_tests/parity_tests/ordered_dict_python314.pypyre/extra_tests/parity_tests/property_text_signatures_python314.pypyre/extra_tests/parity_tests/range_text_signatures_python314.pypyre/extra_tests/parity_tests/script_source_encoding_startup.pypyre/extra_tests/parity_tests/set_text_signatures_python314.pypyre/extra_tests/parity_tests/slice_text_signatures_python314.pypyre/extra_tests/parity_tests/str_text_signatures_python314.pypyre/extra_tests/parity_tests/super_text_signatures_python314.pypyre/extra_tests/parity_tests/syntax_error_python314_offsets.pypyre/extra_tests/parity_tests/tuple_text_signatures_python314.pypyre/extra_tests/parity_tests/type_text_signatures_python314.pypyre/gate-triage.md
🛑 Comments failed to post (2)
pyre/extra_tests/parity_tests/dict_set_sizeof_python314.py (1)
1-3: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Correct the parity-gap comment.
Line 1 says that exact
dictandset__sizeof__values are not asserted. Lines 7-19 assert exact values fordict,set, andfrozenset. Update the comment to describe the existing coverage.Proposed fix
-# CPython-suite gap: exact dict and set __sizeof__ values are not asserted. +# CPython-suite coverage: exact dict and set __sizeof__ values are asserted.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.# CPython-suite coverage: exact dict and set __sizeof__ values are asserted. # parity-tests reason: guard pyre's CPython 3.14 container size surface.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pyre/extra_tests/parity_tests/dict_set_sizeof_python314.py` around lines 1 - 3, Update the leading parity-gap comment in dict_set_sizeof_python314.py to state that exact __sizeof__ values for dict, set, and frozenset are asserted by the tests below, while retaining the existing purpose of guarding Pyre’s CPython 3.14 container-size behavior.pyre/gate-triage.md (1)
974-974: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Fix the default-OFF inventory count.
The heading states 54 entries, but the inventory contains 55 distinct names through Line 1000. Update the count so the documentation matches the listed diagnostics.
Proposed fix
-### §6c — Default-OFF diagnostics, censuses and probes (54): keep, cost nothing +### §6c — Default-OFF diagnostics, censuses and probes (55): keep, cost nothing📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.### §6c — Default-OFF diagnostics, censuses and probes (55): keep, cost nothing🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pyre/gate-triage.md` at line 974, Update the entry count in the “Default-OFF diagnostics, censuses and probes” heading from 54 to 55, leaving the listed diagnostic names unchanged.
What changed
Why
The two-phase annotator/rtyper prepass could vary across processes when pointer-derived keys flowed through unordered containers or when identity-keyed entries outlived their owners. This made gh#1139 difficult to localize and could perturb prepass work order.
Impact
Default behavior gains stable ordering in the affected paths. The new diagnostics remain disabled unless the
PYRE_DETERMINISM_TRACE/PYRE_DTRACE_CONST_*environment variables are set.Verification
cargo check --features dynasm— passed before the final rebasecargo check -p majit-translate— passed after rebasing ontoorigin/maincargo test --features dynasm— one policy test fails because the four new diagnostic environment variables do not yet have entries inpyre/gate-triage.mdSummary by CodeRabbit
Improvements
Diagnostics
PYRE_DETERMINISM_TRACE=1.Documentation